[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
twBRNewSearch( aNewSrch, lReset )
----------------------------------------------------------------------------
Install new search defaults in twBRBrowse().
Arguments:
aNewSrch - 'A' Five element array which defines the search key
handling. aSrch must have the structure:
aNewSrch := { Column number on which to search, ;
Optional colour for the highlight
bar search string display,;
Optional code block for search the
database,;
Optional mask for the search
display,;
Optional prefix to apply to the
search string for scoped browses. }
The element descriptions are:
1 - The column number is simply the member of
aColumns which contains your index key.
2 - The current search string will be
highlighted within the highlight bar for the
browse. You may specify a colour or use the
default.
3 - The code block uses the current search
string as a parameter. Therefore it must be
of a form to properly locate keys in the
index. The default is to apply UPPER() to
the search string. You may make adjustments
for the method you used to create your
index.
4 - A mask for the display to compensate for
differences in the index key and the
displayed values.
5 - If you are operating a scoped browse, all
the displayed records have keys starting
with the same character sequence. You may
pass this sequence to the search mechanism
so the highlighting will match the display.
If aSrch is not passed, the default search
mechanism is:
1 - Search on column 1 of the browse.
2 - Clipper unselected colour.
3 - {|c| UPPER( c ) }
4 - SPACE( LEN( &(INDEXKEY())))
5 - Empty string.
lReset - 'L' Logical to reset the current seek string buffer to
the default. If the search prefix is empty, this is
set to a NULL string.
Return:
A copy of the old search array in case you want to restore it.
Example:
USE Phone INDEX Phone1, Phone2, Phone3 ALIAS Names NEW
SET ORDER TO 3
GO TOP
// aSrch array structure
//
// { Column Number in which to start key display,
// Hilite Bar Exception Color
// Code block for search access to dbf.
// Prefix for common keys in scoped browses,
// Mask for display bar. }
aNewSrch := { 3, "n/*gr",,, "X XX X X X" } // for phone
aOldSrch := twBRNewSearch( aNewSrch, .T. )
See Also:
twBRBrowse()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson